package com.cskaoyan._01btyestream.buffer;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @description:
 * @author: 景天
 * @date: 2023/2/17 17:35
 **/
/*
缓冲区满了会自动刷新
 */
public class Demo3 {
    public static void main(String[] args) throws IOException {
        BufferedOutputStream out = new BufferedOutputStream(
                new FileOutputStream("a.txt"),4);

        // write
        out.write("abcdef".getBytes());

        // flush
        // out.flush();
        // close
        // out.close();
    }
}
